<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>propsData option</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>propsData option</h1>
    <hr>
    <header></header>
    <script type="text/javascript">
         var header_a=Vue.extend({//扩展标签
             template:`<p>{{message}}-{{a}}</p>`,
             data:function(){
                 return{
                     message:'Hello,I am header!'
                 }
             },
             props:['a']
         });
         new header_a({propsData:{a:1}}).$mount('header');  
         //用propsData向扩展标签传值： 1.在全局扩展里加入props进行接收。propsData:{a:1} 2.传递时用propsData进行传递。props:[‘a’] 3.用插值的形式写入模板。
    </script>
</body>
</html>